"""
__author__ = '霍格沃兹测试开发学社'
__desc__ = '更多测试开发技术探讨，请访问：https://ceshiren.com/t/topic/15860'
"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, Session, registry
from commons.result_dao import ResultDao
from commons.api_status_code import APIStatusCode


app = Flask(__name__)
# app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:root123456.@175.178.190.43:3306/testplatform?charset=utf8mb4'
# app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test3.db'

# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# db = SQLAlchemy(app)

mapper_registry = registry()

engine = create_engine('mysql+pymysql://root:root123456.@175.178.190.43:3306/testplatform?charset=utf8mb4')

DBSession = sessionmaker(bind=engine)
db_session: Session = DBSession()
# db_session: Session = session


@app.route("/")
def hello_world():
    return ResultDao.fail(APIStatusCode.FILE_OR_DIR_DEAL_ERROR)


if __name__ == '__main__':
    app.run(debug=True)